package com.example.shiwuyouproject.ui.fragment.my.activity.adapter

import com.cb.ratingbar.CBRatingBar
import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.BaseViewHolder
import com.example.shiwuyouproject.R
import com.example.shiwuyouproject.ui.fragment.my.bean.myDataBean

class MyCommentsAdapter:BaseQuickAdapter<myDataBean, BaseViewHolder>(R.layout.item_mycomments) {
    override fun convert(helper: BaseViewHolder?, item: myDataBean?) {
          helper?.setText(R.id.tvName,item?.org_name)
                  ?.setText(R.id.tvKeMu,item?.work_time?.subject)
              ?.setText(R.id.tvNumber,item?.star)
              ?.setText(R.id.tvTime,item?.work_time?.start_time+"-"+item?.work_time?.end_time)
              ?.setText(R.id.tvCritTime,item?.create_time)
       val startBar: CBRatingBar? =helper?.getView(R.id.myStartBar)
        startBar?.starProgress= (item?.star?.toInt()?.times(10))?.toFloat()!!

    }
}